package com.bfly.mall.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bfly.core.base.entity.BaseEntity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单项
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 21:17
 */
@TableName(value = "orders_sku",resultMap = "OrderSkuResultMap")
public class OrderSku implements Serializable {

    private static final long serialVersionUID = 1342448548002252871L;

    @TableId(value = "id",type = IdType.AUTO)
    private int id;

    /**
     * 产品ID--快照
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/15 21:19
     */
    @TableField("product_id")
    private int productId;

    /**
     * 订单号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 产品名称--快照
     */
    @TableField("pro_name")
    private String productName;

    /**
     * 产品规格名称， 即小规格名称--快照
     */
    @TableField("sku_name")
    private String skuName;

    /**
     * 购买数量--快照
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/15 21:20
     */
    @TableField("buy_count")
    private int buyCount;

    /**
     * 条码--快照
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/15 21:20
     */
    @TableField("sn")
    private String sn;

    /**
     * 原价
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/15 21:20
     */
    @TableField("original_price")
    private BigDecimal originalPrice;

    /**
     * 售价
     */
    @TableField("sale_price")
    private BigDecimal salePrice;

    /**
     * 该产品需支付的总价钱--一般是(salePrice * buyCount)
     * @author 长沙商脉科技有限公司
     * @date 2020/4/17 22:11
     */
    @TableField("pay_price")
    private BigDecimal payPrice;

    /**
     * SKU 或 SPU主图 （优先使用SKU图）
     */
    private String cover;

    /**
     * 商品单位
     */
    private String unit;

    /**
     * 产品描述--快照
     * @author 长沙商脉科技有限公司
     * @date 2020/4/17 22:12
     */
    @TableField("pro_remark")
    private String productRemark;

    /**
     * 是否评价
     * @author 长沙商脉科技有限公司
     * @date 2020/12/31 12:31
     */
    @TableField("is_evaluate")
    private boolean evaluate;

    public boolean isEvaluate() {
        return evaluate;
    }

    public void setEvaluate(boolean evaluate) {
        this.evaluate = evaluate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getProductRemark() {
        return productRemark;
    }

    public void setProductRemark(String productRemark) {
        this.productRemark = productRemark;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public BigDecimal getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(BigDecimal payPrice) {
        this.payPrice = payPrice;
    }

    public int getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(int buyCount) {
        this.buyCount = buyCount;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }
}
